package com.spring.housing1.util;

import com.spring.housing1.constant.AsyncMethod;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

@Component
public class AsyncBussCenterCore {

    @Async("asyncExecutorPool")
    public void asyncDeal(AsyncMethod asyncMethod){
  try{
//      执行异步业务逻辑
      asyncMethod.doAsync();
  }catch (Exception e){
      e.printStackTrace();
  }
    }
}
